package com.dmap.knowledge.vo;

import com.dmap.knowledge.controller.api.param.ArticleAppParam;
import com.dmap.knowledge.controller.api.param.ArticleTagParam;
import com.dmap.knowledge.po.Article;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class ArticleInfoOneVo implements Serializable {
    private String articleId;                                    //文章id
    private String lang;                                        //语言
    private ArticleAppParam app = new ArticleAppParam();        //app
    private String companyNumber;                               //公司编号
    private String coverUrl;                                    //封面地址
    private String articleUrl;                                  //文章url
    private String summary;                                     //简介
    private String title;                                       //标题
    private String authorName;                                  //作者名称
    private String uploaderId;                                  //上传者
    private long startTime;                                     //开始时间
    private long endTime;                                       //结束时间
    private List<ArticleTagParam> tags = new ArrayList<>();     //标签列表
    private String promulgatorId;                               //发布者id
    
    public ArticleInfoOneVo() {
    }
    
    public ArticleInfoOneVo(Article article) {
        this.articleId = article.getId().toString();
        this.lang = article.getLang();
        this.companyNumber = article.getCompanyNumber();
        this.coverUrl = article.getCoverUrl();
        this.articleUrl = article.getArticleUrl();
        this.summary = article.getSummary();
        this.title = article.getTitle();
        this.authorName = article.getAuthorName();
        this.uploaderId = article.getUploaderId().toString();
        this.startTime = article.getPublishTime();
        this.endTime = article.getUsefulTime();
        this.promulgatorId = article.getPromulgatorId().toString();
    }
    
    public String getArticleId() {
        return articleId;
    }
    
    public void setArticleId(String articleId) {
        this.articleId = articleId;
    }
    
    public String getLang() {
        return lang;
    }
    
    public void setLang(String lang) {
        this.lang = lang;
    }
    
    public ArticleAppParam getApp() {
        return app;
    }
    
    public void setApp(ArticleAppParam app) {
        this.app = app;
    }
    
    public String getCompanyNumber() {
        return companyNumber;
    }
    
    public void setCompanyNumber(String companyNumber) {
        this.companyNumber = companyNumber;
    }
    
    public String getCoverUrl() {
        return coverUrl;
    }
    
    public void setCoverUrl(String coverUrl) {
        this.coverUrl = coverUrl;
    }
    
    public String getArticleUrl() {
        return articleUrl;
    }
    
    public void setArticleUrl(String articleUrl) {
        this.articleUrl = articleUrl;
    }
    
    public String getSummary() {
        return summary;
    }
    
    public void setSummary(String summary) {
        this.summary = summary;
    }
    
    public String getTitle() {
        return title;
    }
    
    public void setTitle(String title) {
        this.title = title;
    }
    
    public String getAuthorName() {
        return authorName;
    }
    
    public void setAuthorName(String authorName) {
        this.authorName = authorName;
    }
    
    public String getUploaderId() {
        return uploaderId;
    }
    
    public void setUploaderId(String uploaderId) {
        this.uploaderId = uploaderId;
    }
    
    public long getStartTime() {
        return startTime;
    }
    
    public void setStartTime(long startTime) {
        this.startTime = startTime;
    }
    
    public long getEndTime() {
        return endTime;
    }
    
    public void setEndTime(long endTime) {
        this.endTime = endTime;
    }
    
    public List<ArticleTagParam> getTags() {
        return tags;
    }
    
    public void setTags(List<ArticleTagParam> tags) {
        this.tags = tags;
    }
    
    public String getPromulgatorId() {
        return promulgatorId;
    }
    
    public void setPromulgatorId(String promulgatorId) {
        this.promulgatorId = promulgatorId;
    }
}
